home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / problems.txt < prev    next >
Text File  |  1991-07-05  |  15KB  |  388 lines

  1.     This file contains informal notes about TECO-C.  It includes bugs
  2. and ideas for improvements.
  3.  
  4.     [Unfortunately, it isn't as up to date as possible, some problems
  5. in here are fixed, some aren't strictly "problems"...Manfred]
  6.  
  7.  
  8. . Mark made ~ and F~ commands which aren't documented.
  9. . Mark aded Curses support,  which works for split screen scrolling but
  10.   doesn't support vtedit.  It also needs to completely enter or leave
  11.   split screen mode when the 7:W command is executed,  because I/O is
  12.   lousy to the screen if curses is active,  even when all it should do
  13.   is simple output to  the screen.
  14. . n,m:w commands should return a value, but don't
  15. . Steve Freyder's bug: <-^N-1;a> on a large file loops infinitely under
  16.   MS-DOS and/or Unix?
  17. . if you set eightbit (4096,0et) with TECOC and exit,  it stays set.  If you
  18.   do it with TECO32,  it doesn't.  Why?  Changing the screen height/width
  19.   works as expected. (VMS)
  20. . do a 0,1:w to TECO32,  it just returns.  Do it to TECOC,  it dies with
  21.   bad parameter value.  TECOC should be the same.
  22. . I do a getdvi on the output channel and then do a sensemode in
  23.   open_output_terminal.  They're redundant.  The sensemode should be it.
  24. . EW causes a backup file to be created.
  25.  
  26.  
  27. Problems reported by Richard Graham:
  28.  
  29.     . EI$ doesn't seem to work.  EIfilename$ does. (unsure about this)
  30.     . :]p= returns -1 10 times, then 0 if executed when TECO first starts
  31.        up on a PC.
  32.     . Try ":stext$ .ue :s$" and get ISA error,  and then (on PC) the ?
  33.       command doesn't work.  Generalized problem: TECO-C doesn't
  34.       "overwrite" a numeric value that's on the stack with a new one.
  35.     . How to search for a control-E?  ED flag # 1, ^Eq and ^Eu don't
  36.       seem to let Richard do it.  He says TECO-11 will take FS^E$^E$.
  37.  
  38.  
  39. Problems running under Unix:
  40.  
  41.     . ^C doesn't work.
  42.     . look at "man 3 time" and "man localtime" to implement date/time
  43.     . Is there a way to sensibly set ET_EIGHTBIT under Unix?
  44.     . ZUNIX.C's ZChIn doesn't handle the NoWait argument
  45.  
  46.  
  47. Problems running on PC:
  48.  
  49.     1. editing .EXE files doesn't work. should it?
  50.     2. ZChIn doesn't handle PC-extended characters from the keyboard
  51.     3. After the work to make ^C's work better, doing a ^C in the
  52.        middle of a macro like detab.tec now works; but, ".=" displays
  53.        0.  shouldn't . be in the middle of the file wherever the
  54.        ^C happened?
  55.  
  56.  
  57. There's a test case in TSTQR.TEC that causes TECO-11 to give the
  58. UTC error.  TECOC does too,  but from then on it's screwed up.  Why?
  59.  
  60. To support eight-bit characters, there are several places where casts
  61. to "unsigned char" are used.  The better solution is to go through the
  62. code and declare everything to be unsigned char, then delete the
  63. casts.  Some of the casts are in CHMACS.H.
  64.  
  65. If you search for a string using a match control construct and the
  66. search fails, the "?SRH Search failure "xxx"" error message shows the
  67. match control construct with a <> surrounding it.  TECO-11/32 does
  68. not.
  69.  
  70. BldStr is used by commands other than search commands, yet it reports
  71. the "illegal search string" error sometimes.  It looks like the error
  72. messages from TECO-11/32 aren't really correct.  Need an error message
  73. like "illegal string build construct" or something.
  74.  
  75. The error message "illegal ^E command in search string" would be
  76. better if it were "illegal ^E construct in search string"
  77.  
  78. In ERR.C, the routines ErrMsg, ErrStr and ErrPSt all share code.  Fix
  79. it.  make verbose messages for system errors.  flesh out error
  80. handling in z files Make a test case that checks the cases:
  81.  
  82.     1. call to ErrMsg
  83.     2. call to ErrChr
  84.     3. call to ErrStr
  85.     4. call to ErrPSt
  86.     5. call to ZVrbos on VAX and non-VAX machines
  87.  
  88. re-indent the code (automatically) to use 4-space indenting.  This
  89. will solve the problem that some lines are now too long.  use clean
  90. indenting scheme
  91.  
  92. A command like n+^T$$ won't get parsed right.  Is this a general
  93. problem?
  94.  
  95. merge zfrsrc and baksrc
  96.  
  97. convert pushex to pshnbr and pshopr
  98.  
  99. terminal modes aren't right on Sun
  100.  
  101. use standard Isdigit, etc. macros/functions?
  102.  
  103. The non-VMS ZPrscl's concatenate argv's and spaces to re-construct the
  104. command line.  There are better ways that are operating-system
  105. dependent.
  106.  
  107. The construct: <0a"ad>' is not well-formed in TECOC, but it is in
  108. TECO-11/32 The loop exits when the "end loop" command is skipped.  In
  109. TECOC, this means the loop nesting control variable isn't decremented,
  110. so we "think" we're still in a loop even though we're not.  This isn't
  111. a problem in TECO-11/32.  A more common programming construct is:
  112. <0a"ad|1;'> which works without problems in TECOC.
  113.  
  114. The @-modified form of the ! "command" is supported in TECO-11/32, not
  115. in TECOC.
  116.  
  117. In BOTH tecos, output of a long string to SYS$OUTPUT doesn't work if
  118. the string is long enough.  TECOC gets a signal, TECO-11/32 gets a
  119. "OPCODE reserved to Digital" error.  To fix, must make the "terminal
  120. output buffer" dynamic.
  121.  
  122. All system calls must correctly handle being interrupted by control-C.
  123. Page 228 of "Unix Programmer's Manual, Volume 1" talks about this a
  124. little.  Each system call should check for errors, but should not
  125. treat control-Cs as an error.
  126. If type ^C while it's executing a macro, get "Operation completed
  127. under control-C" and a dollar sign!
  128. If you type a control-C while help is being displayed, you get two
  129. prompts
  130. Control-C works fine at command splits.  Checks need to be inserted
  131. everywhere commands do loops on command arguments. For instance, 23p
  132. needs a check in the loop that calls SinglP.
  133. Does ExeCtT do the right thing when it's read with no wait and the
  134. user types control-C?
  135.  
  136. The following weird thing happens (I forget which TECO):
  137.     1. compile a file/DEBUG/NOOPT in one terminal session
  138.     2. open the file with TECO in another session
  139.     3. debug the application in the first session. Can't find file.
  140.     4. do ^Z^Z to leave TECO in the second session
  141.     5. file is deleted!!!
  142.  
  143. The ^EUq string build construct behaves differently than the
  144. TECO-11/32 algorithm for a special case: if the character in the
  145. q-register is a ^E.  The command "5uas^EUA$" will search for ^E in
  146. TECO-11/32 and will fail in TECO-C.
  147.  
  148. ZFrSrc exists only because I was playing with SCANC on a VAX.  Delete
  149. the VAX-specific code and then merge what's left with BakSrc, using
  150. SIncrm in the loops.  This is much cleaner.
  151.  
  152. Local q-registers need to be tested further.
  153.  
  154. CBf, SBf, TBf, ZBf do not expand?
  155.  
  156. Finish creation of TSTPW.TEC, a test case that demonstrates that
  157. ZWRITE mimics TECO-11/32 for all cases of the edit buffer/gap and all
  158. cases of line termination: FF, VT, CR/LF, $/CR/LF, and GapBeg and
  159. GapEnd.
  160.  
  161. Open SOFDEV.RNO for reading, do _glossary$v$$ and see junk. Also, do
  162. rt -r notes.rno and then y$$y$$ and see an extra blank line at the
  163. bottom of the buffer.
  164.  
  165. Use TRNLNM instead of TRNLOG in ZINIT and ZEXEEI.  Make a
  166. general-purpose logical name translation procedure to be used by both?
  167.  
  168. File COMMANDS.TXT has several "not implemented" lines that aren't
  169. right
  170.  
  171. Add help text for E%q and EQq to hlp file.
  172.  
  173. In TECO-11/32, the EG command uses the BldStr-like routine to build
  174. its string.  Teco-c should call BldStr from ZExeEG.
  175.  
  176. The macro system needs to be carefully checked.
  177.  
  178. If do 8192ET, then a null command string with just two escapes won't
  179. "work".  Need to hit three, and then get an error.
  180.  
  181. Scan Appendix C of TECO-11/32 manual for goodies.
  182.  
  183. In ZExeEI:
  184.         1. status != RMS$_NORMAL in ZRedEI does not error
  185.            gracefully.
  186.         2. If find $$ in the middle of the read buffer,  can't
  187.            continue after executing the string.
  188.         3. EI buffer won't expand.
  189.         4. File closure on error on ^C ?
  190.  
  191. ExeCSt was changed to do CBfPtr < CStEnd instead of CBfPtr <= CStEnd.
  192. Track and check.
  193.  
  194. Why clear q-register stack in MemIni if it's been statically
  195. initialized in TECOC?
  196.  
  197. Page 5 of TECO.LST shows ET and ED encodings.  Compare/contrast
  198.  
  199. In ExeFGt, if we're not in a loop, should behave as if we're
  200. <ESC><ESC>.  We're not doing that now.  Put in
  201.  
  202.         If (MstTop)
  203.             {
  204.             CBfPtr = CStEnd;
  205.             return(SUCCESS);
  206.             }
  207.  
  208. into the code before the first return(FAILURE).
  209.  
  210. On the VAX, deal with disk quota overflow. Larry Kilgallen described
  211. the handling of this: when you get a disk quota exceeded, just issue
  212. the identical $PUT call again to exploit overdraft.  This doesn't work
  213. for creating files.
  214.  
  215. Date and time (^B and ^H) commands work under VAX/VMS.  They will work
  216. differently under other systems.  Make a standard?
  217.  
  218. Say jz10v instead of zj10v and the two TECO's behave differently
  219. Normal TECO handles two numbers in a row differently than TECO-C does.
  220. TECO-C dies with a debugging message!!!
  221.  
  222. use register variables
  223.  
  224. use declaration of variables within blocks
  225.  
  226. see if type casts are superfluous in places.  C already does it?
  227.  
  228. The September 1984 issue of Scientific American has an article by
  229. Niklaus Wirth that describes a fast searching algorithm.  Use it?
  230.  
  231. The entire ", ', <, >, O system should be checked.
  232.  
  233. CmdMod should be checked.
  234.  
  235. Is MovGap right?
  236.  
  237. The W command is stubbed out now.  For debugging, ExeW exists, SkpE
  238. skips over EG, EM, EN and EZ as if they were valid commands.  A
  239. problem with this is that the command to turn on SEEALL mode
  240. "-1,3:W^[" returns ERR_NCA error, "negative argument to comma".
  241.  
  242. The code for INCCBP and the other places where ++CBfPtr happens needs
  243. the MStTop test to be changed. Now, if a UTC should be reported, it's
  244. not. It returns SUCCESS!
  245.  
  246. ExeO needs it's handling of CBfPtr to be fixed.  There aren't checks
  247. against CStEnd, and the last "--CBfPtr" may be wrong.
  248.  
  249. Shouldn't CBfPtr be renamed CStPtr?  It would relate better to CStBeg,
  250. CStEnd, etc.
  251.  
  252. help subsystem works on VAX,  won't on another machine
  253.  
  254. Get rid of ??? which marks unfinished or questionable stuff.  Get rid
  255. of calls to ExeNYI.
  256.  
  257. DoEvEs doesn't implement the ES flag exactly like the manual says
  258. DoEvEs has a system-dependent structure (UDummy)
  259.  
  260. the free function is an int on the VAX, void on the SAGE
  261.  
  262. Standard input and standard output are not used to communicate with
  263. the terminal.  UNIX people may expect that they are.  This rules out
  264. using TECO-C in a pipe-oriented manner.
  265.  
  266. Use DbgDCh instead of ZDspCh in ErrMsg for passed string displaying
  267.  
  268. difference between TypChr, EchoIt, CharOut?
  269.  
  270. COLON sounds like a character identifier. So does ATSIGN.
  271.  
  272. ChrFuncs requires DefChars
  273.  
  274. memory overflow
  275.  
  276. skipping commands is NOT finished.
  277.  
  278. In help, for errors, trace down the possible ways the code can print
  279. each error message.  Some of them are unobvious.  Give an explanation
  280. of all the ways an error can be generated to help a user figure out
  281. his error.
  282.  
  283. Page 92 of the manual lists two informational messages.  The 16 bit of
  284. the ET mode control flag suppresses informational messages.  These
  285. messages are neither generated nor suppressed by TECO-C.
  286.  
  287. Doing an "ERfilename$" puts the expanded filespec in the filespec
  288. buffer.  Under TECO-11/32, doing a subsequent "ER$" to change I/O
  289. streams does not wipe out the filespec buffer.  It does in TECO-C.
  290.  
  291. For all the xxxBeg,  xxxEnd,  xxxPtr things,  change all the comments to
  292.     xxxBeg;        /* first char of xxx buffer */
  293.     xxxEnd;        /* last char of xxx buffer */
  294.     xxxPtr;        /* last char of xxx, plus 1 */
  295.  
  296. check the MOBY MUNGER.  It mentions lots of bugs in other TECOs.  Some
  297. of the bugs are esoteric and quite possibly exist in TECO-C
  298.  
  299. nulls are not stripped from input.
  300.  
  301. VAX TPU is able to read a file that is currently locked by another
  302. user, which is useful for looking at BATCH log files while a BATCH job
  303. is running.  TECO-C can't.  I looked at the microfiche code to see how
  304. TPU does it.  It seems to try to open the file, and if it gets
  305. RMS$_FLK, then it tries to open the file again after setting the UPI
  306. bit in FAB$SHR.  This means that it is supposed to do block I/O to the
  307. file.  I couldn't find the place where actual file reading is done
  308. (it's in $fileio, which is in TPU$CAL_MODULE, which I couldn't find.)
  309. Does TPU do block I/O (section mapping?)
  310.  
  311. The following commands are not yet implemented in TECO-C
  312.  
  313.         W       video scope control
  314.         ^Y      equivalent to ".+^S,."
  315.         EL      open log file
  316.         ^F      return value in console switch register
  317.         nEC     control memory management
  318.  
  319. The following commands are not implemented in TECO-C, and probably
  320. never will be, as they require operating system features that cannot
  321. be assumed by a portable TECO.
  322.  
  323.         EZ      zero output tape
  324.         EM      position magnetic tape
  325.  
  326.     In addition, most of the commands defined in Appendix C of
  327.     the manual (Incompatible, Obsolete and System-Specific Commands)
  328.     are not implemented.
  329.  
  330.  
  331.   The ^R command (set or return radix) supports the 8, 10 and 16
  332. radices.  TECO-C parses command-line numeric arguments using the
  333. current radix.  This can make command execution confusing for radix
  334. 16.  Consider the command string "14A=$$", which returns the ascii
  335. value of the 14th character after the character pointer.  If the radix
  336. is 16, the "A" is parsed as part of the number, and the ascii value of
  337. a completely different character will be returned.
  338.   This is a trade-off.  TECO-11/32 always parses command-line arguments
  339. using radix 10.  This destroys TECO's utility as a calculator for
  340. hexadecimal.  I believe access to a base 16 calculator is more
  341. important than possible user confusion. Thus, be careful if you want
  342. to change TECO's radix.  Remember to change it back.  Also note that
  343. if you use TECO-C as a hexadecimal calculator, you must precede
  344. hexadecimal numbers which start with one of the letters A-F with a 0
  345. in order to make TECO-C parse the number correctly.
  346.  
  347. You won't get "%Superseding file" messages.
  348.  
  349.  
  350. Differences between TECO-C and TECO-11 or TECO32 under VMS:
  351.  
  352.     . video only under Unix,  commands somewhat different,  see VIDEO.TXT
  353.     . Command line syntax different under Unix.
  354.     . EO returns 100+
  355.     . 2048 bit of ET flag reverses meaning of DELETE and BACKSPACE keys
  356.     . -1EJ command returns additional operating system types
  357.     . 0:W returns additional terminal types
  358.     . s^n$ gives "invalid search argument", TECO-11/32 does nothing
  359.     . on ^Z^Z^Z, third ^Z is echoed
  360.     . default directory is TECO$MACROS for EI command
  361.     . TECO-C won't allow HP or HPW when edit buffer is empty
  362.     . TECO-C supports q-register I/O commands E% and EQ,  TECO-11
  363.       doesn't
  364.     . TECO-C supports ^EQ* and ^EQ_ as string build contructs, TECO-11
  365.       doesn't
  366.     . TECO-C does case sensitivity correctly,  not with bit checking,
  367.       so TECO-C does not consider "`","{","|","}" and "~" to be
  368.       equivalent to "@","[","\","]" and "^", respectively.
  369.     . The -P, -Y, and -N commands, which are implemented in TECO-11
  370.       version 39,  are not yet implemented in TECO-C.
  371.     . TECO-11 supports switches on file name arguments to commands like
  372.       ER, EB, etc.  TECO-C does not.
  373.     . TECO-11/32 supports files with nonstandard record formats (like
  374.       FORTRAN carriage control).  TECO-C does not.
  375.     . TECO-11/32 does funny stuff with lines ending in <ESC><CR><LF>.
  376.       TECO-C doesn't (it can't under MS-DOS, which uses <CR><LF> as
  377.       line terminators in files.)
  378.     . Escape-sequence handling not in TECOC yet.
  379.     . <DELIM> can be anything in TECO-11/32, not in TECOC
  380.     . :EGcmd args' is in TECO-11/32
  381.     . ^T on/off handling in TECO-11/32 is better than in TECOC
  382.     . values returned by initialization macro are used by TECO-11/32
  383.     . ^E can be set by the user in TECO-11/32
  384.     . :^T command exists in TECO-11/32
  385.     . nOtag0,tag1,tag2$ with an "n" that's out-of-range is supposed to
  386.     . cause no branch at all.  Under TECO-32,  a negative "n" causes a
  387.       branch to tag0.  TECO-C correctly does no branch.
  388.